import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '../static/css/elem.css'
import ECharts from 'vue-echarts'
/********VUEX开始*******/
import { createStore } from 'vuex'
import { router } from './router'
// 创建一个新的 store 实例
const store = createStore({
  state() {
    return {
      count: 0,
    }
  },
  mutations: {
    increment(state) {
      state.count++
    },
  },
})
/**********VUEX结束********/
const app = createApp(App)
// 将 store 实例作为插件安装
app.use(ElementPlus)
app.use(store)
app.use(router)
app.component('chart', ECharts)
app.mount('#app')
